package cn.bone.demo.mongo.bean2;

import org.bson.types.ObjectId;
import org.mongodb.morphia.annotations.Entity;
import org.mongodb.morphia.annotations.Id;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * Created by MD-01 on 2016/9/27.
 * 任务实体类
 */
@Entity("task")
public class Task {

    //主键
    @Id
    private ObjectId id;
    //创建时间
    private Date createTime;
    //工单id
    private String workOrderId;
    //开始时间
    private Date startTime;
    //结束时间
    private Date endTime;
    //模版类型
    private Integer templateType;
    //任务类型(0:模版任务,1:临时任务)
    private Integer taskType;
    //执行人id
    private String executeMemberId;
    //线路id
    private String routeId;
    //线路名称
    private String routeName;
    //任务点
    private List<TaskPoint> taskPoints = new ArrayList<>();

    //任务状态(0:未开始,进行中(1:正常,2:超时,3:延时),已完成(4:正常,5:超时,6:延时),已取消(7:管理员取消,8:例外取消)
    private Integer state;
    //是否延迟
    private Boolean isDelay;
    //延迟后的完成时间
    private Date delayTime;
    //是否例外
    private Boolean isExce;
    //例外id
    private String exceId;

    public ObjectId getId() {
        return id;
    }

    public void setId(ObjectId id) {
        this.id = id;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public String getWorkOrderId() {
        return workOrderId;
    }

    public void setWorkOrderId(String workOrderId) {
        this.workOrderId = workOrderId;
    }

    public Date getStartTime() {
        return startTime;
    }

    public void setStartTime(Date startTime) {
        this.startTime = startTime;
    }

    public Date getEndTime() {
        return endTime;
    }

    public void setEndTime(Date endTime) {
        this.endTime = endTime;
    }

    public Integer getTemplateType() {
        return templateType;
    }

    public void setTemplateType(Integer templateType) {
        this.templateType = templateType;
    }

    public Integer getTaskType() {
        return taskType;
    }

    public void setTaskType(Integer taskType) {
        this.taskType = taskType;
    }

    public String getExecuteMemberId() {
        return executeMemberId;
    }

    public void setExecuteMemberId(String executeMemberId) {
        this.executeMemberId = executeMemberId;
    }

    public String getRouteId() {
        return routeId;
    }

    public void setRouteId(String routeId) {
        this.routeId = routeId;
    }

    public String getRouteName() {
        return routeName;
    }

    public void setRouteName(String routeName) {
        this.routeName = routeName;
    }

    public List<TaskPoint> getTaskPoints() {
        return taskPoints;
    }

    public void setTaskPoints(List<TaskPoint> taskPoints) {
        this.taskPoints = taskPoints;
    }

    public Integer getState() {
        return state;
    }

    public void setState(Integer state) {
        this.state = state;
    }

    public Boolean getDelay() {
        return isDelay;
    }

    public void setDelay(Boolean delay) {
        isDelay = delay;
    }

    public Date getDelayTime() {
        return delayTime;
    }

    public void setDelayTime(Date delayTime) {
        this.delayTime = delayTime;
    }

    public Boolean getExce() {
        return isExce;
    }

    public void setExce(Boolean exce) {
        isExce = exce;
    }

    public String getExceId() {
        return exceId;
    }

    public void setExceId(String exceId) {
        this.exceId = exceId;
    }
}
